import 'package:cook_dinner/pages/caloric/caloric_view/calori_list.dart';
import 'package:cook_dinner/pages/caloric/caloric_view/caloric_top.dart';
import 'package:flutter/material.dart';
import 'package:cook_dinner/config/include.dart';

class Caloric extends StatefulWidget {
  const Caloric({Key? key}) : super(key: key);

  @override
  State<Caloric> createState() => _CaloricState();
}

class _CaloricState extends State<Caloric> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Container(
        width: HYSizeFit.screenWidth,
        height: HYSizeFit.screenHeight,
        decoration: BoxDecoration(
          gradient: RadialGradient(
            center: Alignment.topLeft,
            radius: 1, // 控制渐变的范围，1.0表示从中心点开始，更大的值会使渐变效果扩散更广
            colors: [
              const Color(0xfffef7e7),
              const Color(0xfffef3df),
              const Color(0xfffdf2e5),
              const Color(0xfff9f8ed),
              const Color(0xfff9f8ed).withOpacity(0.5),
            ],
          ),
        ),
        child: ListView(
          padding: EdgeInsets.only(top: 82.rpx),
          children: const [
            CaloricTop(),
            CaloricList(),
            YellowCaloric(),
          ],
        ),
      ),
    );
  }
}
